<div class="container-fluid discovery-container">
    <div post-single class="discovery">
        <div class="content">
            <div ng-if="post.anonymous == 'false'" class="author">
                <img src="{{ post.author.avatar }}" width="30" height="30" />
                <a href="{{ post.author.name }}">
                    {{ post.author.name }}
                </a>
            </div>
            <span ng-bind-html='post.content | contentFilter'></span>
            <div class="infos">
                <span class="label label-info">{{ post.time | date:'yyyy-MM-dd HH:mm:ss' }}</span>
                <div class="menuBar">
                    <button class="btn btn-default btn-sm" ng-click="vote(post)">热度：{{ post.good }}</button>
                    <button class="btn btn-default btn-sm comments" ng-click="isCollapsed = !isCollapsed">评论：{{ post.comments }}</button>
                </div>
            </div>
        </div>

        <div id="commentBox" collapse="isCollapsed">
            <form class="form-inline">
                <input type="text" name="content" ng-model="content" class="form-control" placeholder="评论" />
                <input type="submit" class="btn btn-default btn-sm comment" value="提交" />
            </form>

            <ul class="comment-list">
                <li ng-repeat="comment in comments">
                    <a href="{{ comment.userName }}">{{ comment.userName }}</a> :
                    {{ comment.content }}

                    <span class="comment-time">{{ comment.time | date: 'yyyy-MM-dd HH:mm:ss' }}</span>
                    <!--登录后有删除按钮-->
                    <a ng-if="name == comment.userName" href="javascript:;" deleteId="{{$index}}" class="deleteCommentButton">删除</a>
                </li>
            </ul>
        </div>
    </div>
</div>
